//
//  db.h
//  SrnTeacher
//
//  Created by iDeneb on 5/5/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "User.h"


@interface db : NSObject {
	sqlite3* database_;	
}
-(BOOL) open;
-(BOOL) createUserTable:(sqlite3*)db;
-(BOOL) insertOneChoice:(User*)user;
-(void) getResults:(NSMutableArray*)users;
-(int)getMaxId;
-(int)getQnum;
-(BOOL)updateFlag:(int)num;
-(void)close;
-(BOOL)delete;
-(BOOL)deleteOneQuestion:(int)num;
-(NSMutableArray *)getStatByNum:(int)num;
-(NSMutableArray *)getViewByNum:(int)num;
@end
